package com.ccsc.auth.dao;

import com.ccsc.auth.entity.Department;
import com.ccsc.auth.entity.Position;
import com.ccsc.auth.utils.DataMap;
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;

import java.util.List;

/**
 * 职位
 * Created by yyangs on 2017/2/10.
 */
public interface PositionDao {
    Position getPositionInfoByCondition(Position position) throws Exception;   			                                //根据职位条件查单个职位信息（id等）
    Position getDepartmentAndPosition(Position position) throws Exception;   			                                //根据职位条件查单个职位信息（id等）

    List<Position> getAllPositions() throws Exception;       										                    //获取全部职位列表
    List<Position> getAllPositions( PageBounds pageBounds) throws Exception;					        //分页并根据条件查询职位列表

    List<Position> getPositionInfosByCondition(Position position) throws Exception;   			                        //根据职位条件查职位信息（id等）
    List<Position> getPositionInfosByCondition(Position position, PageBounds pageBounds) throws Exception;              //分页根据职位条件查询职位列表

    List<Position> getPositionsByDepartmentId(Integer departmentId) throws Exception;                                    //根据部门id查职位
    List<Position> getPositionsByUserId(Integer userId) throws Exception;                                               //根据用户id查职位

    Integer createPosition(Position position) throws Exception;  									                    //添加职位
    Integer updatePosition(Position position) throws Exception;  							                            //修改职位
    Integer deletePosition(Position position) throws Exception; 					                                    //删除职位

    Integer createDepartmentAndPosition(Position position) throws Exception;  									        //添加部门职位
    Integer updateDepartmentAndPosition(Position position) throws Exception;  									        //修改部门职位
    Integer deleteDepartmentAndPosition(DataMap dataMap) throws Exception;  									        //删除部门职位
}